﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MasterPage.Master"
    Inherits="System.Web.Mvc.ViewPage<GestionEducativa.Models.UsuarioViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Gestión Educativa
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <a href="#" id="nuevousu">Nuevo usuario</a> | <a href="#" id="modiusu">Modificar usuario</a>
    | <a href="#" id="borrarusu">Deshabilitar usuario</a>
    <div id="formusu" style="padding: 20px">
    </div>
</asp:Content>
<asp:Content ID="ScriptsCU" ContentPlaceHolderID="HeaderContent" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {

            $('#nuevousu').click(function () {
                $.ajax({
                    url: '<%:Url.Content("~/Login/NuevoUsuario")%>',
                    cache: false,
                    type: "GET",
                    dataType: "html",
                    data: 'verificacion='+ 1,
                    success: function (html) {
                        $("#formusu").html(html)
                    }
                });
            });

            $('#modiusu').click(function () {
                $.ajax({
                    url: '<%:Url.Content("~/Login/ModificarUsuario")%>',
                    cache: false,
                    type: "GET",
                    dataType: "html",
                    success: function (html) {
                        $("#formusu").html(html)
                    }
                });
            });

            $('#borrarusu').click(function () {
                $.ajax({
                    url: '<%:Url.Content("~/Login/BorrarUsuario")%>',
                    cache: false,
                    type: "GET",
                    dataType: "html",
                    success: function (html) {
                        $("#formusu").html(html)
                    }
                });
            });

        });
    </script>
</asp:Content>
